﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Site1.Master" AutoEventWireup="true" CodeBehind="LideresXTorneo.aspx.cs" Inherits="BoxScore.Estadisticas.LideresXTorneo" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="../torneo/_info.ascx" tagname="_info" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="lateral1" runat="server">
    
    <img src="../css/images/Ballpark_7.png" alt="publicidad disponible, anuncie con nosotros" />
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="lateral2" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="lateral3" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="contenido" runat="server">

<uc1:_info ID="_info1" runat="server" />

<br />




    <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0">
        <asp:TabPanel runat="server" HeaderText="Estadististicas Ofensivas" ID="TabPanel1" >
        
        <ContentTemplate>
<div id="estOfensivas">
<h3>Lideres Ofensivos</h3>

    <div>
        <asp:DropDownList ID="DropDownList1" runat="server" 
            DataSourceID="ObjectDataSource10" DataTextField="descripcion" AutoPostBack="True" 
            DataValueField="id"></asp:DropDownList>















        <asp:ObjectDataSource ID="ObjectDataSource10" runat="server" 
            SelectMethod="getOffensiveSortingFields" TypeName="BoxScore.Model.BoxScoreBD"></asp:ObjectDataSource>















    </div>
    <div id="informacion">
        <asp:UpdatePanel runat="server" ID="updateofensivo">
            <ContentTemplate>
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" PageSize="10"
                    AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
                    <Columns>
                        <asp:TemplateField HeaderText="Jugador" SortExpression="nombre">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("nombre") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:HyperLink ID="HyperLink1" runat="server" 
                                    NavigateUrl='<%# "~/Jugador/Detalle.aspx?jugador=" + Eval("id_player") %>' 
                                    Text='<%# Eval("nombre") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ab" HeaderText="AB" SortExpression="ab" />
                        <asp:BoundField DataField="run" HeaderText="R" SortExpression="run" />
                        <asp:BoundField DataField="h" HeaderText="H" SortExpression="h" />
                        <asp:BoundField DataField="h2" HeaderText="H2" SortExpression="h2" />
                        <asp:BoundField DataField="h3" HeaderText="H3" SortExpression="h3" />
                        <asp:BoundField DataField="hr" HeaderText="HR" SortExpression="hr" />
                        <asp:BoundField DataField="rbi" HeaderText="RBI" SortExpression="rbi" />
                        <asp:BoundField DataField="bb" HeaderText="BB" SortExpression="bb" />
                        <asp:BoundField DataField="ibb" HeaderText="IBB" SortExpression="ibb" />
                        <asp:BoundField DataField="so" HeaderText="SO" SortExpression="so" />
                        <asp:BoundField DataField="sb" HeaderText="SB" SortExpression="sb" />
                        <asp:BoundField DataField="average" DataFormatString=".{0:F0}" HeaderText="AVG" 
                            SortExpression="average" />
                        <asp:BoundField DataField="slugging" DataFormatString="{0:F3}" HeaderText="SLG" 
                            SortExpression="slugging" />
                    </Columns>
                </asp:GridView>
                
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    SelectMethod="getOffensiveStaticsByTournament" 
                    TypeName="BoxScore.Model.BoxScoreBD">
                    <SelectParameters>
                        <asp:QueryStringParameter Name="idTorneo" QueryStringField="Torneo" 
                            Type="Int32" />
                        <asp:ControlParameter ControlID="DropDownList1" DefaultValue="1" 
                            Name="idRenglon" PropertyName="SelectedValue" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                
            
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList1" 
                    EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>















            
    </div>

</div>
        
        
        
        
        
        
        
        
</ContentTemplate>
        
        
















</asp:TabPanel>
        <asp:TabPanel runat="server" HeaderText="Estadisticas Defensivas" ID="TabPanel2">
        <ContentTemplate>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList3" EventName="SelectedIndexChanged" />
</Triggers>
<ContentTemplate>
    
<div>
    <div>
        <asp:DropDownList ID="DropDownList3" runat="server" 
            DataSourceID="ObjectDataSource30" DataTextField="descripcion"  AutoPostBack="true"  
            DataValueField="id">
        </asp:DropDownList>
        <asp:ObjectDataSource ID="ObjectDataSource30" runat="server" 
            SelectMethod="getDefensiveSortingFields" TypeName="BoxScore.Model.BoxScoreBD"></asp:ObjectDataSource>
    </div>
    <div>
        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
            DataSourceID="ObjectDataSource3">
            <Columns>
                <asp:BoundField DataField="descripcion" HeaderText="Posicion" 
                    SortExpression="descripcion" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HiddenField ID="HiddenField2" runat="server" 
                            Value='<%# Eval("id", "{0}") %>' />
                        <br />
                        <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="ObjectDataSource4" AllowPaging="true">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                        <asp:HyperLink ID="HyperLink3" runat="server" 
                                            NavigateUrl='<%# "~/Jugador/Detalle.aspx?jugador=" + Eval("idPlayer", "{0}") %>' 
                                            Text='<%# Eval("PlayerName", "{0}")  %>'></asp:HyperLink>
                                
                            
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="g" HeaderText="G" SortExpression="g" />
                        <asp:BoundField DataField="gs" HeaderText="GS" SortExpression="gs" />
                        <asp:BoundField DataField="ip" HeaderText="INN" SortExpression="ip" />
                        <asp:BoundField DataField="chances" HeaderText="C" 
                            SortExpression="chances" />
                        <asp:BoundField DataField="outs" HeaderText="O" SortExpression="outs" />
                        <asp:BoundField DataField="a" HeaderText="A" SortExpression="a" />
                        <asp:BoundField DataField="e" HeaderText="E" SortExpression="e" />
                        <asp:BoundField DataField="dp" HeaderText="DP" SortExpression="dp" />
                        <asp:BoundField DataField="pb" HeaderText="PB" SortExpression="pb" />
                        <asp:BoundField DataField="pFildeo" HeaderText="% FCT" DataFormatString="{0:F3}" 
                            SortExpression="pFildeo" />
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="ObjectDataSource4" runat="server" 
                    SelectMethod="getDefensiveLeaderByTournament" 
                    TypeName="BoxScore.Model.BoxScoreBD">
                    <SelectParameters>
                        <asp:QueryStringParameter Name="idTorneo" QueryStringField="torneo" 
                            Type="Int32" />
                        <asp:Parameter DefaultValue="1" Name="idRubro" Type="Int32" />
                        <asp:ControlParameter Name="idPosicion" ControlID="HiddenField2" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
            SelectMethod="getTabla" TypeName="BoxScore.Model.BoxScoreBD">
            <SelectParameters>
                <asp:Parameter DefaultValue="dposition" Name="tabla" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</div>        
    
</ContentTemplate>
</asp:UpdatePanel>

        
        
        
        
</ContentTemplate>
        
        
















</asp:TabPanel>
        
        
        <asp:TabPanel ID="TabPanel3" runat="server" HeaderText="Estadisticas de Picheo">
        
        <ContentTemplate>
        
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList2" 
                EventName="SelectedIndexChanged" />
</Triggers>
<ContentTemplate>
<div>
    <div>
        <asp:DropDownList ID="DropDownList2" runat="server" 
            DataSourceID="ObjectDataSource20" DataTextField="descripcion" AutoPostBack="true" 
            DataValueField="id">
        </asp:DropDownList>
        <asp:ObjectDataSource ID="ObjectDataSource20" runat="server" 
            SelectMethod="getPitchingSortingFields" TypeName="BoxScore.Model.BoxScoreBD"></asp:ObjectDataSource>
    </div>
    <div>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="ObjectDataSource2" AllowPaging="True">
            <Columns>
                <asp:TemplateField HeaderText="Jugador">
                    <ItemTemplate>
                        <asp:HiddenField ID="HiddenField1" runat="server" 
                            Value='<%# Eval("id_player", "{0}") %>' />
                        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                            DataSourceID="ObjectDataSource1" GridLines="None">
                            <Fields>
                                <asp:TemplateField ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="HyperLink2" runat="server" 
                                            NavigateUrl='<%# "~/Jugador/Detalle.aspx?jugador=" + Eval("id", "{0}") %>' 
                                            Text='<%# Eval("first_name", "{0}") + " " + Eval("last_name", "{0}") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Fields>
                        </asp:DetailsView>
                        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                            SelectMethod="getJugador" TypeName="BoxScore.Model.BoxScoreBD">
                            <SelectParameters>
                                <asp:Parameter DefaultValue="0" Name="idliga" Type="Int32" />
                                <asp:ControlParameter ControlID="HiddenField1" Name="idplayer" 
                                    PropertyName="Value" Type="Int32" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="w" HeaderText="W" SortExpression="w" />
                <asp:BoundField DataField="l" HeaderText="L" SortExpression="l" />
                <asp:BoundField DataField="average" DataFormatString="{0:F3}" HeaderText="ERA" 
                    SortExpression="average" />
                <asp:BoundField DataField="juego" HeaderText="G" SortExpression="juego" />
                <asp:BoundField DataField="cg" HeaderText="CG" SortExpression="cg" />
                <asp:BoundField DataField="savedgame" HeaderText="SV" 
                    SortExpression="savedgame" />
                <asp:BoundField DataField="ip" HeaderText="INN" SortExpression="ip" />
                <asp:BoundField DataField="h" HeaderText="H" SortExpression="h" />
                <asp:BoundField DataField="h2" HeaderText="2H" SortExpression="h2" />
                <asp:BoundField DataField="h3" HeaderText="3H" SortExpression="h3" />
                <asp:BoundField DataField="hr" HeaderText="HR" SortExpression="hr" />
                <asp:BoundField DataField="run" HeaderText="R" SortExpression="run" />
                <asp:BoundField DataField="erun" HeaderText="ER" SortExpression="erun" />
                <asp:BoundField DataField="bb" HeaderText="BB" SortExpression="bb" />
                <%--<asp:BoundField DataField="ibb" HeaderText="IBB" SortExpression="ibb" />--%>
                <asp:BoundField DataField="so" HeaderText="SO" SortExpression="so" />
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
            SelectMethod="getPitchingLeadersByTournament" 
            TypeName="BoxScore.Model.BoxScoreBD">
            <SelectParameters>
                <asp:QueryStringParameter Name="idTorneo" QueryStringField="torneo" 
                    Type="Int32" />
                <asp:ControlParameter ControlID="DropDownList2" DefaultValue="1" Name="idRubro" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</div>
        
        
</ContentTemplate>
</asp:UpdatePanel>

        
        
        
        
</ContentTemplate>
        
        
















</asp:TabPanel>
    
    
    </asp:TabContainer>




    
    
    
  
    





</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="resultados" runat="server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="proximos" runat="server">
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="publicidadAjena" runat="server">
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="publicidad" runat="server">
</asp:Content>
